package com.fs.controller.vo.purchase;

import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.time.LocalDateTime;

@Data
public class ReqCreate {
    @NotBlank
    @Pattern(regexp = "^20\\d{2}-[01]\\d-[0-3]\\d\\s[0-2]\\d:[0-5]\\d$",message = "开始时间格式应为yyyy-MM-dd HH:mm")
    private String beginDateTime;

    @NotBlank
    @Pattern(regexp = "^20\\d{2}-[01]\\d-[0-3]\\d\\s[0-2]\\d:[0-5]\\d$",message = "结束时间格式应为yyyy-MM-dd HH:mm")
    private String endDateTime;

    @Min(value = 1,message = "roomID必须大于0")
    private int roomID;
}
